package org.zoomdev.zoom.common.filter.impl;

import org.zoomdev.zoom.common.filter.Filter;

import java.lang.annotation.Annotation;

public final class AnnotationFilter implements Filter<Class> {


    private final Class<? extends Annotation> type;

    public AnnotationFilter(Class<? extends Annotation> type) {
        this.type = type;
    }

    @Override
    public boolean accept(Class value) {
        return value.isAnnotationPresent(type);
    }
}
